package com.atguigu.gmall.feign.ware;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author lsj
 * @create 2021-08-27 22:09
 *
 *
 *  WareFeignClient 保存当前接口的配置。 name/value是作为配置保存用的key
 *      Map<String,FeignCon> map = new HashMap<>();
 *      //每个起一个唯一名字
 */
@FeignClient(url = "http://localhost:20000",name = "ware") //固定地址
public interface WareFeignClient {

    @GetMapping("/hasStock")
    String hasStock(@RequestParam("skuId") Long skuId, @RequestParam("num") Integer num);
}